import { _decorator, Component, Node } from "cc";

import { SeatInTableManager } from "./SeatInTableManager";
import { Table } from "../../common";

const { ccclass, property } = _decorator;
@ccclass('TableManager')
export class TableManager extends Component {
    id: number;
    playerIds: number[];
    onLoad() {
        this.node.children.forEach((node, index) => {
            node.getComponent(SeatInTableManager).direction = index
        })
    }

    init() {
        // this.id = data.id
        // this.playerIds = data.playerIds;
        // this.node.children.forEach((node, index) => {
        //     node.getComponent(SeatInTableManager).playerId = this.playerIds[index]
        // })


    }

    // setSeatPlayerId() {
    //     this.node.children.forEach((node, index) => {
    //         node.getComponent(SeatInTableManager).playerId = this.playerIds[index]
    //     })

    // }


}

